package com.dengyuanke.observerpattern.pullmodel;

/**
 * 观察者实现类
 * Created by dengyuanke on 2017/9/1.
 */
public class ConcreteObserver implements Observer {
    @Override
    public void update(Subject subject) {
        System.out.println("======调用主题的两个方法开始=====");
        ((ConcreteSubject)subject).oneMethod();
        ((ConcreteSubject)subject).twoMethod();
        System.out.println("======调用主题的两个方法结束=====");
    }
}
